package com.asiainfo.integration.tibco;


import javax.servlet.http.HttpServlet;

/**
 * Usage:
 *
 * @author Charkey
 * @date 2015/12/18
 */
public class MainTester extends HttpServlet {

    static {
        name = "haha";
    }

    private static String name = "chen";

    /**
     * @param args
     */
    public static void main(String[] args) throws NoSuchFieldException, IllegalAccessException {
        System.out.println(name);
    }

    static void printBin(int h) {
        System.out.println(String.format("%32s",
                Integer.toBinaryString(h)).replace(' ', '0'));
    }

    static int hash(int h) {
        h ^= (h >>> 20) ^ (h >>> 12);
        return h ^ (h >>> 7) ^ (h >>> 4);
    }

    public static String reverse(String strToReverse) {
        char[] charArray = strToReverse.toCharArray();
        int begin = 0;
        int end = charArray.length - 1;
        while (begin < end) {
            char temp = charArray[begin];
            charArray[begin] = charArray[end];
            charArray[end] = temp;
            begin++;
            end--;
        }
        return String.valueOf(charArray);
    }
}
